'use strict';

export const ADD_TAB = 'ADD_TAB';
export const SELECT_TAB = 'SELECT_TAB';
export const PREVIOUS_TAB = 'PREVIOUS_TAB';
export const NEXT_TAB = 'NEXT_TAB';
export const REMOVE_TAB = 'REMOVE_TAB';
export const EDIT_TAB = 'EDIT_TAB';

export function addTab(tab) {
  return { type: ADD_TAB, tab };
}

export function selectTab(name) {
  return { type: SELECT_TAB, name };
}

export function previousTab() {
  return { type: PREVIOUS_TAB };
}

export function nextTab() {
  return { type: NEXT_TAB };
}

export function removeTab(id) {
  return { type: REMOVE_TAB, id };
}

export function editTab(id, payload) {
  return { type: EDIT_TAB, id, payload };
}
